package com.example.administrator.wallet.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Effect:
 * <p>
 * Author:  CaiYapeng
 * <p>
 * Time  :  2018/7/19.
 */
public class mViewPagerAdapter extends FragmentPagerAdapter {
    private List<Fragment> datas;
    private List<String> fragment_title;
    public mViewPagerAdapter(FragmentManager supportFragmentManager, List<Fragment> datas,List<String> fragment_title) {
        super(supportFragmentManager);
        this.datas=datas;
        this.fragment_title=fragment_title;
    }

    @Override
    public Fragment getItem(int position) {
        return datas.get(position);
    }

    @Override
    public int getCount() {
        return datas.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return fragment_title.get(position);
    }
}
